<?php
/**
 * ImpSoft Product Row Model
 * If the product's row object should have any special functionality, it goes in
 * here. Usually the bulk of the model code will go in the table, not the row
 * 
 * @package ImpSoft
 * @subpackage ImpSoft Models
 * @copyright Luke Visinoni (luke.visinoni@gmail.com)
 * @author Luke Visinoni (luke.visinoni@gmail.com)
 * @license GNU Lesser General Public License
 */
class ProductRow extends ImpSoft_Db_Table_Row {

	/**
	 * Before a product is created, we should set the "created" column to now
	 */
    protected function _insert() {
	
		if (empty($this->created)) {
			$this->created = new Zend_Db_Expr("NOW()");
		}
		if (empty($this->modified)) {
			$this->modified = new Zend_Db_Expr("NOW()");
		}
	
	}
	/**
	 * Before a product is updated, we should set the "modified" column to now
	 */
    protected function _update() {
	
		$this->modified = new Zend_Db_Expr("NOW()");
	
	}

}